import React from 'react'
import classnames from 'classnames'


const cls = (defaultCls, className) => classes => classnames(defaultCls, classes, className)

const Wrap = defaultCls => WrappedComponent => ({ className, ...rest }) => {
  return (
    < WrappedComponent {...rest} cls={cls(defaultCls, className)} />
  )
}


export default Wrap